package org.x.casemodule.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import org.apache.ibatis.type.StringTypeHandler;
import org.x.casemodule.enums.EventStatus;
import org.x.casemodule.enums.EventType;

import java.lang.Long;
import java.util.Date;
import java.lang.Object;
import java.lang.String;
import java.lang.Integer;

/**
 * 日程事件表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Data
@Table(value = "schedule_event",dataSource = "caseDS")
public class ScheduleEventEntity {

    /**
     * 事件ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 事件标题
     */
    @Column(value = "title")
    private String title;

    /**
     * 事件类型
     */
    @Column(value = "type")
    private EventType type;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(value = "start_time")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(value = "end_time")
    private Date endTime;

    /**
     * 地点
     */
    @Column(value = "location")
    private String location;

    /**
     * 创建者ID（关联user表）
     */
    @Column(value = "creator_id")
    private Long creatorId;

    /**
     * 关联案件ID
     */
    @Column(value = "case_id")
    private Long caseId;

    /**
     * 开庭信息（法院、法庭等）
     */
    @Column(value = "court_info", typeHandler = StringTypeHandler.class)
    private Object courtInfo;

    /**
     * 是否锁定（开庭事件不可修改）
     */
    @Column(value = "is_locked")
    private Integer isLocked;

    /**
     * 事件状态
     */
    @Column(value = "status")
    private EventStatus status;

    @Column(value = "create_time")
    private Date createTime;

    @Column(value = "update_time")
    private Date updateTime;
}
